import request from '@/utils/request'

export function getRoutesAll() {
  return request({
    url: '/admin/permission/getAll',
    method: 'get'
  })
}

export function getAll() {
  return request({
    url: '/admin/permission/getselectData',
    method: 'get'
  })
}

export function getData(query) {
  return request({
    url: '/admin/permission/getData',
    method: 'get',
    params: query
  })
}

export function permissionDisable(data) {
  return request({
    url: '/admin/permission/disable',
    method: 'post',
    data
  })
}

export function permissionEnable(data) {
  return request({
    url: '/admin/permission/enable',
    method: 'post',
    data
  })
}

export function createPermission(data) {
  return request({
    url: '/admin/permission/add',
    method: 'post',
    data
  })
}

export function updatePermission(data) {
  return request({
    url: '/admin/permission/edit',
    method: 'post',
    data
  })
}

export function delPermission(data) {
  return request({
    url: '/admin/permission/del',
    method: 'post',
    data
  })
}
